<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="javax.servlet.http.HttpServletRequest" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<%

HttpServletRequest request = null;
String ip = request.getHeader("x-forwarded-for");     
  if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {     
     ip = request.getHeader("Proxy-Client-IP");    
     System.out.println("Proxy-Client-IP : " + ip);
 }     
  if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {     
     ip = request.getHeader("WL-Proxy-Client-IP");
     System.out.println("WL-Proxy-Client-IP : " + ip);
  }     
 if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {     
      ip = request.getRemoteAddr();     
      System.out.println("IP : " + ip);
 }     

 
%>


</body>
</html>